using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._ToRaster
{
    /// <summary>
    /// <para>ASCII To Raster</para>
    /// <para>Converts an ASCII file representing raster data to a raster dataset.</para>
    /// <para>将表示栅格数据的 ASCII 文件转换为栅格数据集。</para>
    /// </summary>    
    [DisplayName("ASCII To Raster")]
    public class ASCIIToRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ASCIIToRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_ascii_file">
        /// <para>Input ASCII raster file</para>
        /// <para>The input ASCII file to be converted.</para>
        /// <para>要转换的输入 ASCII 文件。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output raster dataset to be created.</para>
        ///   <para>If the output raster will not be saved to a geodatabase, specify .tif for TIFF file format, .CRF for CRF file format, .img for ERDAS IMAGINE file format, or no extension for Esri Grid raster format.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的输出栅格数据集。</para>
        ///   <para>如果输出栅格不会保存到地理数据库中，请为 TIFF 文件格式指定 .tif 。CRF 表示 CRF 文件格式，.img 表示 ERDAS IMAGINE 文件格式，或者 Esri Grid 栅格格式没有扩展名。</para>
        /// </xdoc></para>
        /// </param>
        public ASCIIToRaster(object _in_ascii_file, object _out_raster)
        {
            this._in_ascii_file = _in_ascii_file;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "ASCII To Raster";

        public override string CallName => "conversion.ASCIIToRaster";

        public override List<string> AcceptEnvironments => ["autoCommit", "compression", "configKeyword", "pyramid", "rasterStatistics", "scratchWorkspace", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_ascii_file, _out_raster, _data_type.GetGPValue()];

        /// <summary>
        /// <para>Input ASCII raster file</para>
        /// <para>The input ASCII file to be converted.</para>
        /// <para>要转换的输入 ASCII 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input ASCII raster file")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_ascii_file { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output raster dataset to be created.</para>
        ///   <para>If the output raster will not be saved to a geodatabase, specify .tif for TIFF file format, .CRF for CRF file format, .img for ERDAS IMAGINE file format, or no extension for Esri Grid raster format.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的输出栅格数据集。</para>
        ///   <para>如果输出栅格不会保存到地理数据库中，请为 TIFF 文件格式指定 .tif 。CRF 表示 CRF 文件格式，.img 表示 ERDAS IMAGINE 文件格式，或者 Esri Grid 栅格格式没有扩展名。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Output data type</para>
        /// <para><xdoc>
        ///   <para>Specifies the data type of the output raster dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Integer—An integer raster dataset will be created.</bullet_item><para/>
        ///     <bullet_item>Float—A floating-point raster dataset will be created.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出栅格数据集的数据类型。</para>
        ///   <bulletList>
        ///     <bullet_item>整数—将创建整数栅格数据集。</bullet_item><para/>
        ///     <bullet_item>浮点数—将创建浮点栅格数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output data type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_type_value _data_type { get; set; } = _data_type_value._INTEGER;

        public enum _data_type_value
        {
            /// <summary>
            /// <para>Integer</para>
            /// <para>Integer—An integer raster dataset will be created.</para>
            /// <para>整数—将创建整数栅格数据集。</para>
            /// </summary>
            [Description("Integer")]
            [GPEnumValue("INTEGER")]
            _INTEGER,

            /// <summary>
            /// <para>Float</para>
            /// <para>Float—A floating-point raster dataset will be created.</para>
            /// <para>浮点数—将创建浮点栅格数据集。</para>
            /// </summary>
            [Description("Float")]
            [GPEnumValue("FLOAT")]
            _FLOAT,

        }

        public ASCIIToRaster SetEnv(int? autoCommit = null, object compression = null, object configKeyword = null, object pyramid = null, object rasterStatistics = null, object scratchWorkspace = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, compression: compression, configKeyword: configKeyword, pyramid: pyramid, rasterStatistics: rasterStatistics, scratchWorkspace: scratchWorkspace, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}